﻿<%@ Page Language="C#" MasterPageFile="~/MMhome.Master" AutoEventWireup="true" CodeBehind="MruleManageAdd.aspx.cs"
    Inherits="MobileManager.MruleManageAdd" Title="添加规则" %>

<%@ Register Src="~/UserControl/ProvinceListQuick.ascx" TagName="Province" TagPrefix="uc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    <script language="javascript" type="text/javascript" src="Js/UCcalendar/WdatePicker.js"></script>

    <script type="text/javascript">
        function CheckInt(objT) {
            var strValue = objT.value.Trim();
            if (strValue != "") {
                if (isNaN(strValue)) {
                    alert("请输入正整数！");
                    objT.focus();
                }
                else {
                    if (strValue.indexOf(".") > -1 || strValue.indexOf("-") > -1) {
                        alert("请输入正整数！");
                        objT.focus();
                    }
                }
            }
        }
        function CheckADD() {
            var strCount = document.getElementById('<%=txtCount.ClientID%>').value.Trim();
            if (strCount == "") {
                alert("发送条数不能为空！");
                return false;
            }
            var strDate = document.getElementById('<%=inputDate.ClientID%>').value.Trim();
            if (strDate == "") {
                alert("下次联网时间不能为空！");
                return false;
            }
            var strTimeInterval = document.getElementById('<%=txtTimeInterval.ClientID%>').value.Trim();
            if (strTimeInterval == "") {
                alert("更新时间间隔不能为空！");
                return false;
            }
            return true;
        }
        function CancelFun() {
            window.location.href = "MruleManage.aspx";
            return false;
        }
    </script>

    <style type="text/css">
        .tdInfo
        {
            text-align: left;
            height: 40px;
            font-size: 12px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderMain" runat="server">
    <div style="width: 100%; text-align: center; margin: 10px 10px 10px 10px; font-size: 12px;">
        <table style="width: 70%;" border="1">
            <tr>
                <td style="text-align: left;">
                    通道编号：
                </td>
                <td class="tdInfo">
                    <span style="color: Red;">*</span>
                    <asp:DropDownList ID="ddlChannel" runat="server" CssClass="dropnormal" AutoPostBack="True"
                        OnSelectedIndexChanged="ddlChannel_SelectedIndexChanged">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td style="text-align: left;">
                    运营商编号：
                </td>
                <td class="tdInfo">
                    <span style="color: Red;">*</span>
                    <asp:DropDownList ID="ddlODEP" runat="server" CssClass="dropnormal" Enabled="false">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td style="width: 20%; text-align: left;">
                    省份：
                </td>
                <td class="tdInfo">
                    <div style="overflow-y: scroll; width: 100%; height: 200px">
                        <asp:CheckBoxList ID="cblProvince" runat="server">
                        </asp:CheckBoxList>
                    </div>
                </td>
            </tr>
            <tr>
                <td style="text-align: left;">
                    客户编号：
                </td>
                <td class="tdInfo">
                    <div style="overflow-y: scroll; width: 100%; height: 200px">
                        <asp:CheckBoxList ID="cblCustomer" runat="server">
                        </asp:CheckBoxList>
                    </div>
                </td>
            </tr>
            <tr>
                <td style="text-align: left;">
                    发送条数：
                </td>
                <td class="tdInfo">
                    <span style="color: Red;">*</span>
                    <asp:TextBox ID="txtCount" runat="server" CssClass="txtBoxNormal" MaxLength="20"
                        onblur="CheckInt(this)"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td style="text-align: left;">
                    下次联网时间：
                </td>
                <td class="tdInfo">
                    <span style="color: Red;">*</span>
                    <input class="Wdate" id="inputDate" name="inputDateStart" runat="server" type="text"
                        onclick="WdatePicker()" />
                </td>
            </tr>
            <tr>
                <td style="text-align: left;">
                    更新时间间隔(天)：
                </td>
                <td class="tdInfo">
                    <span style="color: Red;">*</span>
                    <asp:TextBox ID="txtTimeInterval" runat="server" CssClass="txtBoxNormal" MaxLength="10"
                        onblur="CheckInt(this)"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td style="text-align: left;">
                    状态：
                </td>
                <td class="tdInfo">
                    <span style="color: Red;">*</span>
                    <asp:DropDownList ID="ddlStatus" runat="server" CssClass="dropnormal">
                        <asp:ListItem Value="0" Text="关闭"></asp:ListItem>
                        <asp:ListItem Value="1" Text="启用" Selected="True"></asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td style="text-align: left;">
                    <asp:Button ID="btnSave" runat="server" Text="保 存" CssClass="button_blue" Width="80px"
                        OnClick="btnSave_Click" OnClientClick="return CheckADD();" />&nbsp;&nbsp;
                    <asp:Button ID="btnCancel" runat="server" Text="取 消" CssClass="button_blue" Width="80px"
                        OnClientClick="return CancelFun();" />
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
